<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>收缩</title>
    <style>
        .box1{
            background-color: #F23;
            float: left;
        }

        .son1{
            background-color: yellow;
            height: 100px;
            width: 200px;
        }

        .father {
            background-color: red;
        }
    </style>
</head>
<body>
<!--收缩值得是: 如果一个block元素  浮动之后它的宽度  就由内容决定了,而不是由父容器决定-->
<div class="box1">
    AAAAAAAA
</div>
<hr>
<div style="background-color: red;">
    <div style="background-color:green;
height: 100px;width: 100px;float: right">

    </div>
    <div class="father">

    </div>
</div>
</body>
</html>